//
// Created by Jisam on 2024/7/19.
//
#include <bits/stdc++.h>
#define PSI pair<string,int>
#define PII pair<int,int>
#define VVI vector<vector<int>>
#define VI vector<int>
#define VS vector<string>

#define PQLI priority_queue<int, vector<int>, less<int>>
#define PQGI priority_queue<int, vector<int>, greater<int>>
#define i64 long long

using namespace std;
const int maxn = 1e5+ 5;
struct node{
    int x,y,idx;
}a[maxn];
const int N = 1e5 + 5;
int ans;
void solve() {
    int n;
    cin >> n;
    for(int i = 0 ; i < n ; i ++){
        cin >> a[i].x >> a[i].y;
        a[i].idx = i + 1;
    }
    sort(a,a+n,[&](node n1 ,node n2){
        return n1.x * n2.y < n1.y * n2.x;
    });
//    for(int i = 0 ; i < n ; i ++){
//        cout << a[i].x <<" " << a[i].y <<" " << a[i].idx << "\n";
//    }
    cout << a[0].idx;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
        solve();
    return 0;
}